﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using Newtonsoft.Json;

namespace CloudTree.Models
{
    public class DropboxTreeModel
    {
        public string state = "closed";
        public string data;
        public DBTreeAttribute attr;
        public List<DropboxTreeModel> children;

        [JsonProperty(PropertyName = "root")]
        public string Root { get; set; }

        [JsonProperty(PropertyName = "is_dir")]
        public bool IsDirectory { get; set; }

        [JsonProperty(PropertyName = "path")]
        public string Path { get; set; }

        [JsonProperty(PropertyName = "contents")]
        public IEnumerable<DropboxTreeModel> Contents { get; set; }
    }

    public class DBTreeAttribute
    {
        public string id;
    }
}